Apparatus for dynamic learning of voltage source capabilities

ABSTRACT

A universal serial bus (USB) source device adapted to be coupled to a USB sink device via a USB cable, the USB source device including: a voltage bus (VBUS) terminal adapted to be coupled to a VBUS conductor of the USB cable; a configuration channel (CC) terminal adapted to be coupled to a CC conductor of the USB cable; a VOUT node coupled to the VBUS terminal and adapted to be coupled to a voltage supply; a controller circuit coupled to the VBUS terminal, the CC terminal and the VOUT node; a load circuit coupled to a discharge signal connection of the controller and to the VOUT node; and a resistor divider coupled to the VOUT node and the controller and adapted to be coupled to the voltage supply.

CROSS REFERENCE TO RELATED APPLICATIONS

Under 35 U.S.C. § 120, this continuation application claims benefits ofand priority to U.S. patent application Ser. No. 16/597,385 (TI-76490A),filed on Oct. 9, 2019 and to U.S. patent application Ser. No. 15/392,047(TI-76490), filed on Dec. 28, 2016 and issued as U.S. Pat. No.10,476,394, the entirety of which are hereby incorporated herein byreference.

BACKGROUND

Some interconnect specifications define a power delivery protocol inwhich a first device advertises its power delivery capabilities (e.g.,voltages and currents) to a second device. The first device thus sourcespower and the second device sinks power. In some implementations, thepower capabilities of the source device are hard-coded in a controllerinternal to the source device. The source device accesses its presetconfiguration and advertises those particular power capabilities to thesink device. The sink selects one of the advertised power capabilitiesand the source device configures its power source for the agreed uponpower capability.

SUMMARY

In one embodiment, a system may include a power supply configurable togenerate any of a plurality of output voltages on a power supply outputnode. The system also may include a voltage auto-detection powerdistribution (PD) controller coupled to the power supply. The voltageauto-detection PD controller may be configured to monitor an inputsignal for detection of presence of a device coupled to the system via acable and assert combinations of a plurality of control signals. Foreach combination of control signals, the voltage auto-detection PDcontroller may measure a value of an output voltage from the powersupply, store the measured value, and generate a plurality of packetsfor transmission to the device. Each packet contains a parameterindicative of a measured output voltage.

In another embodiment, a system may include a power supply, a powerswitch, a voltage auto-detection power distribution (PD) controller anda configurable resistor divider network. The power supply may beconfigurable to generate any of a plurality of output voltages on apower supply output node. The power switch may be coupled between thepower supply output node and a voltage bus and may be configured tocouple an output voltage from the power supply output node to thevoltage bus. The voltage auto-detection PD controller may be coupled tothe power supply and, via an enable signal, to the power switch. Thevoltage auto-detection PD controller may be configured to control thepower switch to selectively be in an open state or a closed state. Theconfigurable resistor divider network may be coupled to the voltageauto-detection PD controller. The voltage auto-detection PD controllermay be configured to initiate a power supply output voltage learningmode upon detection of a sink device coupled to the system via a cable.During the power supply output voltage learning mode, the voltageauto-detection PD controller may be configured to use the enable signalto configure the power switch to an off state and assert combinations ofa plurality of control signals to the configurable resistor dividernetwork. For each combination of control signals, the voltageauto-detection PD controller may be configured to measure a value of anoutput voltage from the power supply and generate a plurality of packetsfor transmission to the sink device with each packet containing aparameter indicative of a measured output voltage.

In yet another embodiment, a method may include detecting attachment ofa first device to a second device and iteratively configuring a powersupply of the second device to produce a plurality of output voltages.For each iteration, the method may include measuring each output voltageand storing a value indicative of each measured output voltage. Themethod also may include transmitting communication packets to the firstdevice. The communication packets may include the values indicative ofthe measured output voltages.

BRIEF DESCRIPTION OF THE DRAWINGS

For a detailed description of various examples, reference will now bemade to the accompanying drawings in which:

FIG. 1 shows an embodiment in which a power source device which includesa voltage auto-detection power distribution (PD) controller is coupledto a sink device over a cable in accordance with various examples;

FIG. 2 shows an embodiment of the power source device of FIG. 1 inaccordance with various examples;

FIG. 3 shows an embodiment of the voltage auto-detection PD controllerin accordance with various examples;

FIG. 4 shows another embodiment of the voltage auto-detection PDcontroller in accordance with various examples;

FIG. 5 illustrates an embodiment in which a pull-up resistor on acommunication channel conductor can be selectively disconnected throughcontrol by the voltage auto-detection PD controller; and

FIG. 6 shows a method in accordance with various embodiments.

DETAILED DESCRIPTION

Reference may be made herein to the Universal Serial Bus (USB)Power-Delivery (PD) and Type-C specifications, but such references aremerely made for illustrative purposes and do not limit the scope of thisdisclosure and the claims. This disclosure is directed to otherspecifications as well. Various USB PD and Type-C specifications enabledelivery of higher power levels over USB cables and connectors. Thistechnology creates a universal power plug for laptops, tablets, etc.that may require more than, for example, 5V. The USB-PD specification,for example, defines a communication link between ports connected via aUSB-PD cable. The communication may be half-duplex and packet-based. Thecommunication packets contain information that enables the two ports tocommunicate and negotiate the voltage and current a source port willprovide to a port. The underlying communication per the USB PDspecification may be Biphase Mark Coding (BMC). Such communicationhappens independently from the normal USB communications that passthrough the same cable, albeit on different wires. USB-PD communicationpackets flow over a different conductor (e.g., the control channel (CC)conductor) rather than the USB data conductors.

A power source device (sometimes referred to as a “source”) mayadvertise its supply types in the form of power data objects (PDO) thatare included in a USB PD message called a Source Capabilities message.Fixed-Supply PDO's contain a voltage and maximum current;Variable-Supply PDO's contain maximum voltage, minimum voltage, andmaximum current; Battery-Supply PDO's contain maximum voltage, minimumvoltage, and maximum power. A source device may advertise multipleunique PDO's. A sink device (sometimes referred to as a “sink”) mayrequest one of the advertised power capabilities via a USB PD messagecalled a Request message. If the source can meet the sink's request thesource sends an Accept message; otherwise the source may send a Rejector Wait message. Once the source has adjusted its power supply, thesource sends a PS_RDY message to inform the Sink that the sink can beginsinking the power at the agreed up on level.

Before advertising its voltage capabilities, the source first detectsthat a sink has been attached by way of a cable or other connectionmechanism. The source may include a pull-up resistor on the CCconductor. The sink includes a pull-down resistor or clamp on the CCconductor. The source detects the presence of the sink by measuring theDC voltage on the CC conductor. At one voltage level or range ofvoltages, the source determines that no sink is attached, and at adifferent level or range of voltages, the source determines that a sinkis attached. The source then may verify that the voltage on the CCconductor stabilizes for a predetermined period of time (e.g., between100 ms and 200 ms) for debounce purposes. Per the applicablespecification, the source then applies a predetermined voltage (e.g.,5V) to the power wire (referred to as the voltage bus (VBUS) in the USBPD specification) of the cable within 475 ms. Then, after applying thepredetermined voltage (e.g., 5V), the source may send communicationmessages advertising its source power capabilities (e.g., using thePDO's as described above), such as which voltages can be provided andthe current level for each corresponding voltage.

Ina power supply output voltage learning mode, the source determines thevoltages that the source's power supply can generate before the sourcecan advertise the voltages to the sink. In accordance with the disclosedembodiments, a voltage auto-detection PD controller in the sourcedynamically learns the voltages the source's power supply can generatebefore advertising such power capabilities to the sink. In thisembodiment, the power supply's power capabilities are not pre-configuredinto the source's PD controller. Instead, the power supply's powerdistribution capabilities are dynamically determined by a voltageauto-detection PD controller in the source. For a supply type that ischaracterized by a minimum and maximum voltage (and not simply multiplediscrete voltage levels), the voltage auto-detection PD controller maycontrol the power supply to reach its maximum and minimum voltagesindividually, and then advertises the voltage range. For a supply typecharacterized by a single voltage, power supply has multiple voltagesettings, any of which can be used. The auto-detection PD controller inthis case controls the power supply to reach each of its uniquevoltages, and then advertises those unique voltages.

FIG. 1 illustrates an embodiment of a power source device 100 coupled toa sink device 80 via a cable 90. The power source device 100 cangenerate and provide an operating voltage and current to the sink device80, which uses the voltage and current provided by the power sourcedevice 100 to power a load 82 in the sink device. The load 82 mayinclude any type of circuit(s) such as processors, memory, customcircuits, passive components, active components, etc. In someembodiments, the power source device 100 may comprise a power “brick”which is a power adapter that converts AC Mains power to a DC voltageand current for the sink device 80. In other embodiments, the powersource device 100 may be, or may be part of, a compute device such as acomputer, tablet device, etc. Further, the power source device 100 maybe capable of dual mode operation, that is, either as a source device inwhich it generates power or a sink device in which sinks power generatedby another device. For some implementations, the power source and sinkdevices 100 and 80 implement the USB PD and Type-C specifications,although other specifications and protocols may be implemented as well.

The power source device 100 includes a power supply 102, an outputcapacitor (C_(OUT)), a pull-up resistor 106 (which may be implemented asa current source integrated in an integrated circuit (IC) of the powersource device), and a voltage auto-detection power distribution (PD)controller 120. The power supply 102 receives and converts the input ACMains voltage to one more output DC voltages and currents and providesthe output DC power to the sink device 80 via the voltage bus (V_(BUS))100. The voltage auto-detection PD controller 120 of the power sourcedevice 100 may interact with a PD controller 84 (which may be the sameas or different from the voltage auto-detection PD controller 120) inthe sink device 80 to negotiate which voltage level the power supply 102is to generate and provide to the sink device 80. The power supply 102may be capable of generating output voltages at any of multipledifferent levels (e.g., 5V, 9V, 15V, 20V, etc.). In various embodimentsthe power supply 102 may be capable of generating only a single outputvoltage, two different output voltages, three output voltages, etc. Thevoltage auto-detection PD controller 120 in the source device advertisesto the PD controller 84 in the sink device 80 (e.g., by way of messagestransmitted over a control channel (CC) conductor (e.g., wire,conductive trace, etc.) 104. The sink device 80 can select one of theadvertised voltages, and the voltage auto-detection PD controller 120responds by configuring the power supply 102 to supply the agreed uponvoltage to the sink device 80. In embodiments in which the power supplyis characterized by a voltage range capability between a minimum voltageand a maximum voltage, the sink device 80 can request a voltage betweenthe minimum and maximum advertised by the voltage auto-detection PDcontroller 120.

In addition to be being used to transmit the communication packetsduring the power negotiation process, the CC conductor 104 may be usedfor an additional reason which is to permit the voltage auto-detectionPD controller 120 to detect when the sink device 80 has been connectedto the power source device 100 via, for example, a cable 90. The pull-upresistor 106 is coupled between the CC conductor 104 within the powersource device 100 and a pull-down resistor 86 is coupled between the CCconductor 104 within the sink device 80. As such, the voltage level onthe CC conductor will be at a higher level with no sink device 80connected to the power source device 100 than if the sink device 80,with its pull-down resistor 86, is connected to the power source devicevia cable 90. The voltage auto-detection PD controller 120 thus candetect whether a sink device 80 is connected to it by monitoring thevoltage level on the CC conductor 104.

As mentioned above, the power supply 102 may be capable of generatingany of a number of different voltages. In accordance with the disclosedembodiments, the voltage auto-detection PD controller 120 performs aprocess by which the controller dynamically determines the particularvoltage capabilities of the power supply 102 and advertises thoseparticular voltages to the sink device 80. As such, the voltageauto-detection PD controller 120 need not be preconfigured for aparticular set of voltages and thus can be used with a wide variety ofpower supplies. Further still, because the voltage auto-detection PDcontroller 120 learns the actual voltages that the power supply 102 cangenerate, the power supply 102 need not be designed for a particularprecise voltage level. That is, when designing a power supply system,each actual power supply may have different characteristics which maycause its output voltages to be slightly different, but because thevoltage auto-detection PD controller 120 measures the voltages the powersupply can actually generate, design restrictions and tolerances may berelaxed for the power supply design.

FIG. 2 shows an example of a possible implementation of the power sourcedevice 100. The source device 100 includes various components coupledtogether as shown to form the power supply 102. Some of the componentsmay include a bridge rectifier 140, an isolation transformer 144, and aconstant-voltage, constant-current flyback controller 142. Various otherpassive components such as resistors, capacitors, etc. are shown aswell. The bridge rectifier 140 rectifies the incoming AC Mains waveform.The flyback controller 142 provides a constant voltage using an opticalcoupler formed by photodiode 111 and photodetector 114.

The voltage auto-detection PD controller 120 is shown as having a pairof CC terminals labeled as CC1 and CC2. The connectors for cable 90 maybe symmetrical meaning that the connector is not keyed and can thus beconnected in either of two orientations. As such, there may be two CCconductors, and one is used depending on the orientation of which thecable is attached. The power supply 102 generates an output voltagedesignated in FIG. 2 as VOUT and is the voltage on node 108. Node 108 isthe output node of the power supply 102 and couples to a power switch(e.g., field effect transistor Q1) 116. The power switch 116 may becontrolled to be in an on (closed) state or an off (open) state bycontrol signal GDen from the voltage auto-detection PD controller 120.Node 110 couples to the opposite terminal of the power switch 116 fromnode 108 and the voltage on that node is provided to the voltage bus(VBUS) and provided through the cable 90 to the sink device 80. When thepower switch 116 is on, the voltage on VBUS is largely the same as theVOUT voltage.

The voltage auto-detection PD controller 120 may include ananalog-to-digital converter (ADC) that may be used to convert either orboth of the VOUT or VBUS voltages to a digital form. The VOUT voltage isprovided to the voltage auto-detection PD controller 120 by way of theV_(PWR) terminal and the VBUS voltage is provided to the V_(PWR)terminal as shown.

A configurable resistor divider network 130 also may be included andcoupled to the voltage auto-detection PD controller 120. In theembodiment of FIG. 2, the configurable resistor divider network 130 mayinclude a pair of series-connected resistors coupled between the VOUTnode 108 and ground. As shown, the resistors include resistor 112 a(R_(FBU)) and resistor 112 b (R_(FBL)). The node between resistors 112 aand 112 b is designated as resistor node 117. The voltage auto-detectionPD controller 120 includes a pair of control terminals illustrated asCTL1 and CTL2 (and sometimes referred to as the CTL1 signal and the CTL2signal). The configurable resistor divider network 130 also includesresistor 112 c (R_(FBL1)) coupled to the CTL1 terminal of the voltageauto-detection PD controller 120 and resistor 112 d (R_(FBL2)) coupledto the CTL2 terminal. The CTL1 and CTL2 terminals may be open-drainterminals. As such, the voltage auto-detection PD controller 120 canconfigure each CTL1 and CTL2 terminals to be open or grounded. If theCTL1 terminal is pulled low, then its corresponding resistor 112 c iscoupled in parallel with resistor 112 b, thereby changing the resistanceof part of the resistor divider network 130. If, however, the CTL2 isleft open, then resistor 112 c is left floating and thus effectively notincluded in the resistor divider network. The same is true for the CTL2terminal—pulling CTL2 low causes its corresponding resistor 112 d to beplaced in parallel with resistor 112 b; otherwise resistor 112 d is notplaced in parallel with resistor 112 b. Each combination of controlsignals CTL1 and CTL2 may configure the configurable resistor dividernetwork differently than other combinations of the control signals. Inother embodiments, rather than a configurable resistor divider network,the power source device 100 may include programmable current sources tovary the amount of current in a controlled manner through resistor 112a. In other embodiments, the auto-detection PD controller may have acircuit capable of setting different reference voltages using, forexample, a digital-to-analog converter (DAC).

Current flows from Vout, through the configurable resistor dividernetwork 130 to ground. The magnitude of the current is a function of theequivalent resistance of the resistor divider network 130 and thus is afunction of whether each resistor 112 c and 112 d is coupled in parallelwith resistor 112 b by operation of the CTL1 and CTL2 signals. Byvarying the amount of current through the resistor divider network 130due to operation of the CTL1 and CTL2 signals, the voltage acrossresistor 112 a can be varied and thus the current through the photodiode111 can be varied. The intensity of the light produced by the photodiode111 may be a function of the current through the photodiode. The lightgenerated by the photodiode 111 is detected by the photodetector 114.Thus, the combination of the photodiode 111 and the photodetector 114forms an optical feedback signal to the flyback converter 142. Theflyback converter 142 uses the optical feedback signal to regulate itsoutput voltage VOUT.

The power supply 102 may be capable of generating multiple differentvoltages and, for each such voltage, regulates VOUT to track theparticular voltage based on the optical feedback signal from thephotodiode 111. Further, the power supply 102 can be configured by thevoltage auto-detection PD controller 120 through configuration of theCTL1 and CTL2 signals to produce a particular output voltage VOUT. Withtwo control signals (CTL1 and CTL2) in this example, four configurationsare possible for the configurable resistor divider network 130. The fourcombinations differ from each other as far as whether the resistors 112c and 112 d are included in parallel with resistor 112 b.

In accordance with the disclosed embodiments, upon detection of the sinkdevice 80 (e.g., by monitoring the voltage level on the CC1 or CC2conductors), the voltage auto-detection PD controller 120 begins aprocess of identifying the various voltages that the power supply 102can produce. The voltage auto-detection PD controller 120 may performthis process by iteratively cycling through the various combinations ofthe CTL1 and CTL2 signals. For each combination of the CTL1 and CTL2control signals, the voltage auto-detection PD controller 120 measuresthe value of its output voltage VOUT and stores the measured value(e.g., in non-volatile memory internal to or otherwise accessible to thecontroller). The voltage auto-detection PD controller 120 may wait for apredetermined period of time to allow the VOUT voltage to settle beforemaking the measurement using, for example, an ADC internal to thevoltage auto-detection PD controller 120. After cycling through thevarious combinations of CTL1 and CTL2, the voltage auto-detection PDcontroller 120 may advertise the measured voltages to the sink device 80as described above. For example, the voltage auto-detection PDcontroller 120 may generate a plurality of packets for transmission tothe sink device 80, with each packet containing a parameter indicativeof a measured output voltage. In some embodiments such as with aprogrammable current source there may be too many voltages for theauto-detection PD controller to measure in a reasonable amount of time,and the controller in such embodiments may measure a maximum and minimumvoltage, and advertise the maximum and minimum voltages to the sinkdevice.

While the voltage auto-detection PD controller 120 is performing theVOUT learning process, the power switch 116 may be configured to be inan off state by the voltage auto-detection PD controller 120. Thus, thevarious voltages generated by the power supply during the aforementionedlearning process are not placed on the VBUS node 110 and thus notprovided to the sink device 80. The voltages that are measured by thevoltage auto-detection PD controller 120 are the voltages on the VOUTnode 108 with power switch 116 in an off (open) state.

In some implementations, however, the power source device 100 may beobligated to place a predetermined voltage on the VBUS node 110 within apreset amount of time upon detecting the presence of the sink device 80.For example, for the USB PD specification, the power source device 100is to place 5V on VBUS within 475 ms of the detection of the sink device80. Thus, for the embodiment of FIG. 2, the time required to cyclethrough the various CTL1 and CTL2 combinations, measure and record theVOUT voltages should be less than 475 ms according to the USB PDspecification. Other embodiments for complying with this timingrequirement are described below.

The embodiment of FIG. 1 also includes a load circuit 140 coupledbetween the VOUT node 108 and ground. The load circuit 140 in thisexample includes a resistor 142 coupled in series with a solid stateswitch 144. The gate of the solid state switch 144 functions as anenable/disable terminal for the load circuit 140. The gate of the solidstate switch 144 may be driven by a discharge (DSCG1) signal from thevoltage auto-detection PD controller 120. If the DSCG1 signal is in onelogic state (e.g., high), switch 144 is in an on (closed) state therebypermitting current from the VOUT node 108 to flow to ground. In theopposite logic state for DSCG1, switch 144 will be in an off (open)state, thereby precluding current from flowing from the VOUT node 108 toground. The voltage auto-detection PD controller 120 may use the DSCG1signal to effectively apply a load to the VOUT node 108 to helpstabilize the power supply output. In some embodiments, the load circuit140 may be separate from the voltage auto-detection PD controller 120 asshown in FIG. 1, or the solid state switch 144 may be integrated intothe voltage auto-detection PD controller 120. The voltage auto-detectionPD controller 120 also includes a discharge signal DSCG2 which isconfigurable to permit current to flow from the VBUS node 110 throughresistor 119 and through an internal solid state switch to ground. Thus,the voltage auto-detection PD controller 120 is configurable to apply aload to either or both of the VOUT node 108 and VBUS node 110.

Upon measuring the various VOUT voltages that the power supply 102 cangenerate, the voltage auto-detection PD controller 120 also maycalculate upper and lower voltage limits for each measured voltage. Suchvoltages thus define an acceptable range for the power supply's outputvoltage and thus can be used to implement under and overvoltageprotection. In some embodiments, the voltage auto-detection PDcontroller 120 computes upper and lower voltage thresholds as:V _(UPPER) =V _(MEAS)*α_(UPPER) +O _(UPPER)V _(LOWER) =V _(MEAS)*α_(LOWER) +O _(LOWER)where V_(UPPER) is the upper voltage limit, V_(MEAS) is the measuredvoltage, α_(UPPER), α_(LOWER), O_(UPPER), and O_(LOWER) include theallowed supply tolerance and the allowed measurement tolerances. Theα_(UPPER), α_(LOWER), O_(UPPER), and O_(LOWER) parameters may bedetermined apriori and stored in memory in the voltage auto-detection PDcontroller 120. For each possible VOUT voltage determined by the voltageauto-detection PD controller 120 to be producible by the power supply102, the voltage auto-detection PD controller 120 computes a pair ofupper and lower voltage thresholds and stores the computed thresholds inmemory. During operation, the voltage auto-detection PD controller 120may measure the voltage on the VBUS, compare the voltage to thethresholds for the applicable power supply voltage and respondaccordingly if an over or under-voltage condition is detected (e.g., byturning off power switch 116).

In embodiments in which device 100 may be capable of functioning eitherto source power to another device or sink power from another device, thevoltage auto-detection PD controller 120 of the power source device 100may initialize itself into a “sink” mode in which the device 100 isconfigured to receive an operating voltage (rather than generate thevoltage) from the other device over the cable 80. While in the sinkmode, however, the voltage auto-detection PD controller 120 of thedevice 100 (now operating to sink power) can perform the processdescribed above to assert the various combinations of the controlsignals CTL1 and CTL2 and to measure the output voltage values from itsown power supply. Then, the voltage auto-detection PD controller 120 maysend a USB PD message called a PR_SWAP message to the other device toadvertise the measured voltages. This technique permits the device 100to have more time to measure its various possible voltages.

In another embodiment, the voltage auto-detection PD controller 120 maymeasure the VOUT voltage to certain value, but round the measured valueto a different value. For example, the voltage auto-detection PDcontroller may measure VOUT as 14.8V but round the measured value up to15V and advertise 15V to the sink device 80 rather than the measuredvalue of 14.8V. In such embodiments, the packets generated andcommunicated by the power source device 100 to the sink device 80 mayinclude a combination of actual measured voltage values and roundedvalues. Either way, the voltage auto-detection PD controller 120 sendspackets to the sink device 80 that contain a parameter that isindicative of the measured VOUT voltage value—the parameter is eitherthe actual measured value or its rounded counterpart.

FIG. 3 illustrates a block diagram of at least a portion of the voltageauto-detection PD controller 120. In this example, the voltageauto-detection PD controller 120 includes a state machine 150, a voltagemultiplexer 152 and an ADC 154. The ADC 154 can be used to digitizeeither the VOUT voltage or the VBUS voltage as selected through themultiplexer 152 by a control signal from the state machine 150. Thestate machine 150 may be implemented as a microcontroller executingmachine instructions, a programmable logic device, or other suitabletype of control circuit. The state machine 150 may include or couple tomemory 152 for storage of the parameters used to compute the voltagethresholds noted above as well as store the measured values of thevoltage and/or the rounded values.

FIG. 4 illustrates another embodiment of the power source device 100.The power supply 102 and voltage auto-detection PD controller 120 inthis embodiment are largely the same as that described above with regardto FIG. 2. Several differences, however, are present in FIG. 4 relativeto FIG. 2. The configurable resistor divider network 130 of FIG. 2 hasbeen replaced with a configurable resistor divider network 170 in FIG.4. As for the configurable resistor divider network 130, theconfigurable resistor divider network 170 includes a pair ofseries-connected resistors 172 and 174 coupled between the VOUT node 108and ground. Another pair of resistors 176 and 178 are connected to node173 defined between resistors 172 and 174. Rather than connecting theopposing terminal of resistors 172 and 174 to the voltage auto-detectionPD controller's CTL1 and CTL2 terminals, the resistors 172, 174 arecoupled through corresponding solid state switches to ground. Resistor176 thus connects between resistor node 173 and switch 180, whileresistor 178 connects between resistor node 173 and switch 182. The CTL1and CTL2 signals are provided to the gates of switches 180 and 182 andthus can turn the switches on and off. When a given switch 180, 182 ison, its corresponding resistor 176, 178 is coupled in parallel toresistor 174; otherwise the corresponding is left floating and thus notcoupled in parallel to resistor 174.

Another difference for the embodiment of FIG. 4 relative to that of FIG.2 is that the embodiment of FIG. 4 includes a DC-to-DC (DC/DC) converter160. The DC/DC converter 160 is coupled between the power supply 102 andthe VBUS node 110. Thus, the input DC voltage to the DC/DC converter 160is the VOUT voltage and the output DC voltage from the DC/DC converter160 is provided to the VBUS node 110. The output voltage from the DC/DCconverter 160 may be the voltage that the power source device is toimpose on the VBUS node 110 within the period of time of thecorresponding specification. In the USB PD example above, the powersource device 110 was to place 5V on VBUS within 475 ms. The outputvoltage produced by the DC/DC converter 160 thus may be 5V in thisexample. The DC/DC converter 160 also includes an enable/disableterminal coupled to a control terminal of the voltage auto-detection PDcontroller 120 (e.g., DCDCen as illustrated in FIG. 4). The DCDCensignal can be selectively asserted by the voltage auto-detection PDcontroller 120 to enable or disable operation of the DC/DC converter160. In embodiments in which the process of sequencing through thevarious possible voltages producible by the power supply, measuring thevoltages and storing them in memory takes longer than the allottedperiod of time by which the power supply must be configured to produce arequired voltage (e.g., 5V), the voltage auto-detection PD controller120 may enable the DC/DC converter 160 generate and/or provide itsoutput voltage on to the VBUS node 110. The DC/DC converter 160 may becapable of generating the predetermined voltage (5V in this example)from any of the various voltages producible by the power supply 102.Thus, the acceptable input voltage range for the DC/DC converter 160 iswide enough to at least include the various voltages that the powersupply 102 conceivably might produce. In some embodiments, while theDC/DC converter 160 applies a voltage to VBUS, the auto-detection PDcontroller 120 only advertises 5V to the sink device 80, and only offersa small amount of current. In such cases, the DC/DC converter 160 can beimplemented as a relatively simple and an inexpensive circuit.

The DC/DC converter 160 can be enabled by the voltage auto-detection PDcontroller 120 to produce its output voltage for the VBUS node 110 anddo so while power switch 116 remains off so that the voltageauto-detection PD controller 120 can continue the process of leaning thevarious voltages that the power supply 102 can be generate.

FIG. 5 shows an embodiment similar to that of FIG. 1. FIG. 5 illustratesa technique to provide more time for the source device's voltageauto-detection PD controller to measure and record the various voltagesproducible by the power supply 102. In this example, the pull-upresistor 106 may be removed from the CC conductor 104 on the sourcedevice side of the cable by turning off switch 180. The switch 180 canbe controlled by a control signal from the voltage auto-detection PDcontroller 120. Turning off the switch 180 and effectively removing thepull-up resistor from the circuit emulates a disconnection of the sinkdevice 80. The voltage auto-detection PD controller 120 may perform theprocess of learning the power supply voltages and then turn on switch180.

FIG. 6 shows a flow chart of a method 20 in accordance with thedisclosed embodiments. The operations may be performed in the ordershown, or in a different order. Further, the operations may be performedsequentially or two or more of the operations may be performedconcurrently.

At 202, the method includes initializing the power source device 100into a low-power state. While in this state, the power source device(and, for example, the voltage auto-detection PD controller inparticular) operates in a power supply output voltage learning mode inwhich at least one function performed is to wait for, and monitor,attachment of a sink device 80, and perform the rest of the operationsshown in FIG. 6. In some embodiments, the voltage auto-detection PDcontroller 120 may perform this operation by comparing the voltage onthe CC conductor (CC1 or CC2) to predetermined voltage ranges-onevoltage range may be indicative of lack of attachment of a sink device80 and another voltage range may be indicative of attachment of a sinkdevice. At 204, the method includes detecting the attachment of a sinkdevice.

At 206, the method begins validating the attached sink device.Validating the attached sink device may include ensuring that thevoltage on the CC conductor remains between a lower threshold and anupper threshold for a predetermined period of time to guard againstfalse alarms when a sink device is not actually attached. In someembodiments, the lower threshold is 0 volts. In one example, however,the lower and upper thresholds are 0.2V and 1.6V, respectfully, and thepredetermined period of time is 150 ms. The predetermined period of timecould be longer as desired as long the voltage to VBUS is enabled withinthe required period of time.

Operations 208-214 describe an iterative loop in which the voltageauto-detection PD controller 120 of the power source device learns thevarious voltages that the power supply can generate. At 208, the methodincludes the voltage auto-detection PD controller 120 settings to causethe power supply to generate a first output voltage (VOUT). In someembodiments, the voltage auto-detection PD controller may adjust thecontrol signals CTL1 and CTL2 to thereby cause the power supply togenerate a particular output voltage based on the optical feedbacksignal as described above. At 210, the method may include waiting for aparticular period of time before measuring (at 212) the output voltage(VOUT) from the power supply. The period of time may help to permit thepower supply's output voltage to stabilize in order for a more accuratevoltage measurement to be made. In some embodiments, the period of timeis fixed and configured into the voltage auto-detection PD controller120. In other embodiments, the period of time may be based on successivemeasurements. That is, a series of voltage measurements may be taken inquick succession (e.g., 1 ms apart) after the power supply is configuredfor the output voltage, and when the measured voltage ceases to changefrom one such measurement to the next by more than a threshold amount(e.g., the change from one measurement to the subsequent measurement isless than a threshold percentage), the series of measurements ceases andthe last measured voltage is used. At 212, the measured voltage also maybe stored in, for example, internal memory of the voltage auto-detectionPD controller 120. The recording may also include the configurationsettings for the CTL1 and CTL2 signals that were used to cause the powersupply to generate the measured voltage. Further, still the voltageauto-detection PD controller 120 also may compute the upper and lowervoltage thresholds for the measured voltage (as explained in the exampleabove) and store the computed voltage thresholds as well in memory. Assuch, a record is created in memory of the measured voltage for a givenconfiguration of the CTL1/CTL2 signals as well as the correspondingupper and lower voltage thresholds. In some embodiments, the recordingmay be made to non-volatile memory so that the learning process need notbe performed every time a sink device is attached. In other embodiments,the auto-detection PD controller 120 may store the recording until theAC main power input is removed.

At 214, the voltage auto-detection PD controller 120 determines whetherany more configurations for CTL1/CTL2 remain to be used. If any suchcombinations remain, then at 216, the voltage auto-detection PDcontroller 120 controls the CTL1 and CTL2 signals accordingly and themethod loops back to operation 210. In some embodiments, per theapplicable specification (e.g., the USB PD specification), the powersupply must be capable of generating a predetermined voltage (e.g., 5V).Since that voltage is required, the voltage auto-detection PD controller120 need not exercise the power supply using the CTL1, CTL2 signals tomeasure that voltage. Instead, the voltage auto-detection PD controller120 knows apriori that the power supply 102 is capable of generatingthat voltage. In some embodiments, the required voltage (e.g., 5V) maybe the minimum voltage producible by the power supply and corresponds toa particular combination of CTL1 and CTL2 signals (e.g., both signalshigh-drains left open). That particular combination of CTL1/CTL2 signalsmay be omitted if desired during the power supply output voltagelearning process. In some embodiments, multiple voltages may beimplemented that may have predetermined CTL1, CTL2 signals known toproduce them.

If the voltage auto-detection PD controller 120 has exercised the powersupply 102 through all relevant combinations of the CTL1 and CTL2signals, then at 218, the method comprise completing the validation ofthe attached sink device 80 as explained above. To complete the sinkvalidation process, the CC voltage should have stayed between thethresholds for a certain amount of time, which may be a relatively longcompared to the time used in 206. A timer can be started in 206, and ifmore time is needed to ensure the CC voltage has stabilized, the timermay be extended in 218. The intervening operations 208-216 may beperformed during the predetermined time period during which the attachedsink device is being validated. If no valid sink device is attached (asdetermined at 220), then the process loops back to 202 and the processmay repeat. If, however, a valid sink device is attached, then the powersupply 120 is configured (via the appropriate combination of the CTL1and CTL2 signals) to generate a predetermined output voltage (e.g., 5V)and the power switch 116 is turned on by the voltage auto-detection PDcontroller 120 to provide the predetermined voltage to the VBUS node110. The power switch is turned on via a control signal from the voltageauto-detection PD controller 120 as explained above.

At 224, the voltage auto-detection PD controller 120 generates andtransmits packets to the sink device to advertise the various voltagesdetermined to be producible by the power supply. As noted above, theadvertisements may include the actual voltages that were measured orrounded versions of the measured voltages.

Certain terms are used throughout the following description and claimsto refer to particular system components. As one skilled in the art willappreciate, different companies may refer to a component by differentnames. This document does not intend to distinguish between componentsthat differ in name but not function. In the following discussion and inthe claims, the terms “including” and “comprising” are used in anopen-ended fashion, and thus should be interpreted to mean “including,but not limited to . . . .” Also, the term “couple” or “couples” isintended to mean either an indirect or direct wired or wireless (e.g.,optical) connection. Thus, if a first device couples to a second device,that connection may be through a direct connection or through anindirect connection via other devices and connections. The abovediscussion is meant to be illustrative of the principles and variousembodiments of the present invention. Numerous variations andmodifications will become apparent to those skilled in the art once theabove disclosure is fully appreciated. It is intended that the followingclaims be interpreted to embrace all such variations and modifications.

What is claimed is:
 1. A universal serial bus (USB) source deviceadapted to be coupled to a USB sink device via a USB cable, the USBsource device comprising: a voltage bus (VBUS) terminal adapted to becoupled to a VBUS conductor of the USB cable; a configuration channel(CC) terminal adapted to be coupled to a CC conductor of the USB cable;a VOUT node coupled to the VBUS terminal and adapted to be coupled to avoltage supply; a controller circuit coupled to the VBUS terminal, theCC terminal and the VOUT node; a load circuit coupled to a dischargesignal connection of the controller circuit and to the VOUT node; and aresistor divider coupled to the VOUT node and the controller circuit andadapted to be coupled to the voltage supply.
 2. The USB source of claim1, wherein the controller circuit is configured to determine supplycapabilities of the voltage supply before communicating the supplycapabilities to the USB sink device via the USB cable.
 3. The USB sourceof claim 2, wherein the supply capabilities includes a voltage level ofat least one of 5V, 9V, 15V, or 20V.
 4. The USB source of claim 1,wherein the load circuit includes: a resistor having a first terminaland a second terminal, the first terminal of the resistor coupled to theVOUT node; and a transistor having a control terminal coupled to thecontroller circuit, a first current terminal coupled to the secondterminal of the resistor and a second current terminal coupled toground.
 5. The USB source of claim 1, wherein the resistor dividerincludes: a first resistor having a first terminal and a secondterminal, the second terminal of the first resistor coupled to thecontroller circuit; a second resistor having a third terminal and afourth terminal, the third terminal is coupled to the first terminal andthe fourth terminal is coupled to the controller circuit; a thirdresistor having a fifth terminal coupled to the VOUT node and a sixthterminal coupled to the first terminal; and a fourth resistor having aseventh terminal coupled to the first terminal and an eighth terminaladapted to be coupled to the voltage supply.
 6. The USB source of claim1, wherein the controller circuit is configured to detect the USB sinkdevice via the CC terminal, and configured to transmit a data packet tothe USB sink device via the CC terminal.
 7. The USB source of claim 1,wherein the controller circuit is configured to detect the USB sinkdevice via the CC terminal, and configured to couple the VBUS terminalto the voltage supply after the power sink device is detected.
 8. Auniversal serial bus (USB) source device adapted to be coupled to a USBsink device via a USB cable, the USB source device comprising: a voltagebus (VBUS) terminal adapted to be coupled to a VBUS conductor of the USBcable; a configuration channel (CC) terminal adapted to be coupled to aCC conductor of the USB cable; a VOUT node coupled to the VBUS terminaland adapted to be coupled to a voltage supply; a controller circuitcoupled to the VBUS terminal, the CC terminal and the VOUT node; aDC-to-DC (DC/DC) converter having a first input coupled to the VOUTnode, a second input coupled to the controller circuit and an outputcoupled to the VBUS terminal; and a resistor divider coupled to the VOUTnode and the controller circuit and adapted to be coupled to the voltagesupply.
 9. The USB source of claim 8, wherein the controller circuit isconfigured to determine supply capabilities of the voltage supply beforecommunicating the supply capabilities to the USB sink device via the USBcable.
 10. The USB source of claim 9, wherein the supply capabilitiesincludes a voltage level of at least one of 5V, 9V, 15V, or 20V.
 11. TheUSB source of claim 8, wherein the resistor divider includes: a firsttransistor having a first control terminal coupled to the controllercircuit, a first current terminal and a second current terminal; asecond transistor having a second control terminal coupled to thecontroller circuit, a third current terminal and a fourth currentterminal; a first resistor having a first terminal and a secondterminal, the first terminal of the first resistor coupled to the VOUTnode; a second resistor having a third terminal and a fourth terminal,the third terminal is coupled to the second terminal of the firstresistor and the fourth terminal is coupled to the first currentterminal; a third resistor having a fifth terminal coupled to the secondterminal of the first resistor and a sixth terminal coupled to the thirdcurrent terminal; and a fourth resistor having a seventh terminalcoupled to the second terminal of the first resistor and an eighthterminal adapted to be coupled to the voltage supply.
 12. The USB sourceof claim 8, wherein the controller circuit is configured to detect theUSB sink device via the CC terminal, and configured to transmit a datapacket to the USB sink device via the CC terminal.
 13. The USB source ofclaim 8, wherein the controller circuit is configured to detect the USBsink device via the CC terminal, and configured to couple the VBUSterminal to the voltage supply after the power sink device is detected.